{
PROB : acng
LANG : PASCAL
ID : phamnamlo2
}

program acng;
const
  fi = 'acng.in';
  fo = 'acng.out';
var
  n, m : int64;

procedure inp;
begin
  read(n);
end;

procedure process;
begin
  m := 0;
  while n <> 1 do
  begin
    inc(m);
    if odd(n) then n := n*3 + 1
    else n := n div 2;
  end;
end;

procedure out;
begin
  writeln(m);
end;

begin
  assign(input, fi); reset(input);
  assign(output, fo); rewrite(output);

  inp;
  process;
  out;

  close(output);
  close(input);
end.
